package com.its.common.disruptor.producer;

import com.its.common.disruptor.dto.TranslatorData;
import com.its.common.disruptor.factory.RingBufferWorkerPoolFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;

/**
 * @Author xiaxp
 * @Date 5/5/22 14:46
 * @Description
 */
@ConditionalOnProperty(prefix = "its.disruptor", name = "enabled", havingValue = "true")
public class DisruptorProducer {
    public void produceData(TranslatorData message){
        RingBufferWorkerPoolFactory.getInstance().produceData(message);
    }
}
